//import Vue from 'vue'
import Router from 'vue-router';

Vue.use(Router)

const router = new Router({
    mode: 'history',
    routes: [{
        path: '/',
        redirect: '/home',
        component: resolve => require(['@/views/home/home.vue'], resolve),
        children: [{
            path: '/home',
            component: resolve => require(['@/views/home/index.vue'], resolve)
        }]
    }, {
        path: '/login',
        component: resolve => require(['@/views/home/login.vue'], resolve),
    }, {
        path: '/main',
        component: resolve => require(['@/views/home/main.vue'], resolve),
    }, {
        path: '/test',
        component: resolve => require(['@/views/test.vue'], resolve),
    }, {
        path: '/rare',
        component: resolve => require(['@/views/rare/main.vue'], resolve),
        children: [{
                path: '/rare',
                component: resolve => require(['@/views/rare/rare.vue'], resolve)
            }, {
                path: '/tumor',
                component: resolve => require(['@/views/rare/rare.vue'], resolve)
            }, {
                path: '/rare/analysis',
                component: resolve => require(['@/views/rare/analysis.vue'], resolve)
            }, {
                path: '/rare/editPatient',
                component: resolve => require(['@/views/rare/editPatient.vue'], resolve)
            }, {
                path: '/rare/addSample',
                component: resolve => require(['@/views/rare/addSample.vue'], resolve)
            }, {
                path: '/rare/analyticRet2',
                component: resolve => require(['@/views/rare/analyticRet2.vue'], resolve)
            }, {
                path: '/rare/task-details',
                component: resolve => require(['@/views/rare/task/task-details.vue'], resolve)
            }, {
                path: '/rare/report',
                component: resolve => require(['@/views/rare/report.vue'], resolve)
            }, {
                path: '/myreport',
                component: resolve => require(['@/views/rare/myReport'], resolve)
            }, {
                path: '/mycustom',
                component: resolve => require(['@/views/rare/myCustom'], resolve)
            },
            {
                path: '/rare/upload',
                component: resolve => require(['@/views/rare/upload.vue'], resolve)
            }, {
                path: '/rare/check',
                component: resolve => require(['@/views/rare/checkGene.vue'], resolve)
            }, {
                path: '/reportflagY',
                component: resolve => require(['@/views/report/rare/reportflagY.vue'], resolve),
            }, {
                path: '/reportflagSon',
                component: resolve => require(['@/views/report/rare/reportflagSon.vue'], resolve),
            }, {
                path: '/tumorY',
                component: resolve => require(['@/views/report/tumor/tumorY.vue'], resolve),
            }, {
                path: '/tumorSon',
                component: resolve => require(['@/views/report/tumor/tumorSon.vue'], resolve),
            }, {
                path: '/404',
                component: resolve => require(['@/components/404.vue'], resolve),
            }
        ]
    }, {
        path: '/familyMain',
        component: resolve => require(['@/views/familyTree/main.vue'], resolve),
        children: [{
            path: '/familyMain',
            component: resolve => require(['@/views/familyTree/newPatient.vue'], resolve)
        }, {
            path: '/allPatient',
            component: resolve => require(['@/views/familyTree/allPatient.vue'], resolve)
        }, {
            path: '/importPatient',
            component: resolve => require(['@/views/familyTree/importPatient.vue'], resolve)
        }, {
            path: '/dataimport',
            component: resolve => require(['@/views/familyTree/dataimport.vue'], resolve)
        }, {
            path: '/addPatient',
            component: resolve => require(['@/views/familyTree/addPatient.vue'], resolve)
        }, {
            path: '/changeRec',
            component: resolve => require(['@/views/familyTree/changeRecord.vue'], resolve)
        }, {
            path: '/drawIndex',
            component: resolve => require(['@/views/familyTree/draw/index.vue'], resolve)
        }, {
            path: '/drawMain',
            component: resolve => require(['@/views/familyTree/draw/main.vue'], resolve)
        }, {
            path: '/rxa',
            component: resolve => require(['@/views/familyTree/cancerForm/rxa.vue'], resolve)
        }, {
            path: '/jzca',
            component: resolve => require(['@/views/familyTree/cancerForm/jzca.vue'], resolve)
        }, {
            path: '/jzxa',
            component: resolve => require(['@/views/familyTree/cancerForm/jzxa.vue'], resolve)
        }, {
            path: '/lca',
            component: resolve => require(['@/views/familyTree/cancerForm/lca.vue'], resolve)
        }, {
            path: '/qlxa',
            component: resolve => require(['@/views/familyTree/cancerForm/qlxa.vue'], resolve)
        }, {
            path: '/sa',
            component: resolve => require(['@/views/familyTree/cancerForm/sa.vue'], resolve)
        }, {
            path: '/wa',
            component: resolve => require(['@/views/familyTree/cancerForm/wa.vue'], resolve)
        }, {
            path: '/yxa',
            component: resolve => require(['@/views/familyTree/cancerForm/yxa.vue'], resolve)
        }, {
            path: '/zgnma',
            component: resolve => require(['@/views/familyTree/cancerForm/zgnma.vue'], resolve)
        }, {
            path: '/health',
            component: resolve => require(['@/views/familyTree/cancerForm/health.vue'], resolve)
        }, {
            path: '/familytree',
            component: resolve => require(['@/components/familyTree.vue'], resolve)
        }, {
            path: '/riskAssess',
            component: resolve => require(['@/views/familyTree/riskAssess.vue'], resolve)
        }]
    },{
        path: '/congenica',
        component: resolve => require(['@/views/congenica/main.vue'], resolve),
        children: [{
            path: '/congenica',
            component: resolve => require(['@/views/congenica/mydata.vue'], resolve)
        },{
            path: '/congenica/editPatient',
            component: resolve => require(['@/views/congenica/editPatient.vue'], resolve)
        }, {
            path: '/congenica/addSample',
            component: resolve => require(['@/views/congenica/addSample.vue'], resolve)
        }]
    }]
})

export default router;